require 'open-uri'
class Photo < Multimedia  
  has_attached_file :data,                    
                    :url  => "images/photos/:style/:id.:extension",
                    :path => "images/photos/:style/:id.:extension",                    
                    :storage => :s3,
                    :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
                    :bucket => 'nerto',
                    :styles => { :original=>'900x900>', :thumb_big =>'200x300>',
                                 :thumb_mid => "80x150>",
                                :thumb => ["50x50#",:gif], :thumb_mini => ["30x30#",:gif] },
                    :convert_options => {  
                     :thumb_big => "-strip -quality 75", 
                     :thumb => "-strip -depth 6",
                     :thumb_mini => "-strip -depth 6",
                     :original => "-strip -quality 75",
                     :thumb_mid => "-strip -quality 75"
                    },
                    :default_style => :thumb
  attr_accessor :data_url
end
